/**
 * BudgetBuoy
 * 
 * Simplify your personal expense management
 * 
 * @team cs2103jan13-w15-3j
 */

//--------------------------------------------------------------

/**
 * Expense Class
 * 
 * Description: Getters and Setters of Expense 
 * 
 * @package shared
 * @author  Li Yin (A0085686L)
 * @editor(s) -
 */


package shared;

public class Expense extends Record {
	protected Category cat;
	protected Mode mode;
	protected Loan linkToLoan;
	//constructor
	public Expense(int _ID, String _name, int _amt, int _dd, int _mm, int _yy, String _detail, 
			Mode _mode, Category _cat){
		ID=_ID;
		name=_name;
		yy=_yy;
		mm=_mm;
		dd=_dd;
		amt=_amt;
		detail=_detail;
		cat=_cat;
		mode=_mode;
		linkToLoan=null;
	}

	//additional getters
	public Category getCat(){
		return cat;
	}
	public Mode getMode(){
		return mode;
	}
	public Loan getLinkToLoan(){
		return linkToLoan;
	}

	//additional mutators
	public void modifyCat(Category newCat){
		cat=newCat;
	}
	public void modifyMode(Mode newMode){
		mode=newMode;
	}
	public void setLinkToLoan(Loan loan){
		linkToLoan = loan;
	}

	//Si Ling added in for CLI expense
	public void modifyName(String newName){
		name = newName;
	}
	
	@Override
	public String toString(){
	String first = super.toString();
	
	String category = cat.toString();
	
	return first + "         " + category;
	
	}
	
	}


